package com.csjung.games.gamenori.server.domain;


import com.google.appengine.repackaged.org.json.JSONObject;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class GamenoriChannel implements Serializable{

  /**
   * 
   */
  private static final long serialVersionUID = -5155268052541840901L;

  private String channelId;
  
  private String message;
  
  private String createUserId;
  
  private String contactUserId;
  
  private String channelType;
  
  
  public GamenoriChannel() {
    super();
  }
  
  public GamenoriChannel(String channelId) {
    setChannelId(channelId);
  }

  public String getChannelId() {
    return channelId;
  }



  public void setChannelId(String channelId) {
    this.channelId = channelId;
  }



  public String getContactUserId() {
    return contactUserId;
  }

  public void setContactUserId(String contactUserId) {
    this.contactUserId = contactUserId;
  }

  public String getCreateUserId() {
    return createUserId;
  }

  public void setCreateUserId(String createUserId) {
    this.createUserId = createUserId;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public String getChannelType() {
    return channelType;
  }

  public void setChannelType(String channelType) {
    this.channelType = channelType;
  }
  
  public String getJsonString() {
    Map<String, String> channel = new HashMap<String, String>();
    channel.put("channelId", getChannelId());
    channel.put("createUserId", getCreateUserId());
    channel.put("contactUserId", getContactUserId());
    channel.put("channelType", getChannelType());
    channel.put("message", getMessage());
    JSONObject message = new JSONObject(channel);
    return message.toString();
  }
}
